'''
1.数字
'''
i, f = 8, 2.56
print(i + f)
print(i * f)
print(i - f)
print(i / f)
print(i // f)
print(i % f)
print(i ** 2)
print(type(i))
print(type(f))

'''
2.字符串
'''
str = "Hello Python!"
str0 = 'Hello PyCharm!'
print(type(str))
print(type(str0))
print('C:\python\num')
print(r'C:\python\num')
print('lu' + 'xuewen', 'w' * 3)
word = 'ilovepython'
print(word[1], word[5])
print(word[-10], word[-7])
print(word[1: 5])
print(word[-10: -6])

'''
3.列表
'''
l = [1, 2, 'hello', 4, 5]
print(type(l))
print(l[0])
print(l[0: 3])
print(l + ['python'])
l[2] = 3
print(l)
l[3: 5] = ['a', 'b']
print(l)


'''
4.元组
'''
t = (1, 2, 'hello')
print(type(t))
print(t[1], t[1: 3])
print(('a', 'b', 'c') + ('d', 'e'))

'''
5.字典
'''
d = {'a': 1, 'b': 2, 'c': 3}
print(type(d))
print(d['a'])
del d['c']
print(d)
d['c'] = 3
print(d)
print(list(d.keys()))
print(sorted(d.keys()))
print('a' in d)
print('f' not in d)

'''
6.集合
'''
s = {'lauwen', 'xwen', 'wen'}
print(type(s))
print('lauwen' in s)
sa = set('awsedsdfg')
sb = set('azsxdzxc')
print(sa)
print(sa - sb)
print(sa | sb)
print(sa & sb)
print(sa ^ sb)


